<?php load_header() ?>

<?php #content ?>
<?php foreach ($user_list->result() as $i => $row): ?>
    <div class="row">
        <div class="action-tools container-fluid">
            <div class="page-header">User Management</div>
            <div class="pull-right">
                <?php echo anchor(PANEL_URL . '/user/index', '<i class="fa fa-list"></i> List', 'class="btn btn-primary"') ?>
            </div>
        </div>
        <div class="container-fluid">
            <?php echo form_open(PANEL_URL . '/user/create', 'role="form"') ?>
            <div style="max-width:400px" id="formStep1">
                <div class="form-group">
                    <label class="control-label">User Name <span class='red'>*</span></label>
                    <input type="text" name="username" value="<?php echo $row->username; ?>" class="form-control">
                </div>
                <div class="form-group">
                    <label class="control-label">First Name <span class='red'>*</span></label>
                    <input type="text" name="fname" value="<?php echo $row->firstname; ?>" class="form-control">
                </div>
                <div class="form-group">
                    <label class="control-label">Last Name <span class='red'>*</span></label>
                    <input type="text" name="lname" value="<?php echo $row->lastname; ?>" class="form-control">
                </div>
                <div class="form-group">
                    <label class="control-label">Email <span class='red'>*</span></label>
                    <input type="email" name="email" value="<?php echo $row->email; ?>" class="form-control">
                </div>
                <div class="form-group">
                    <label class="control-label">Contact Number <span class='red'>*</span></label>
                    <input type="text" name="number" value="<?php echo $row->contact_number; ?>" class="form-control">
                </div>

                <div class="form-group">
                    <label class="control-label">Status <span class='red'>*</span></label>
                    <select name="status" class="form-control">
                        <option <?php if ($row->enable == 1) echo 'selected'; ?> value="1">Enable</option>
                        <option <?php if ($row->enable == 0) echo 'selected'; ?> value="0">Disable</option>
                    </select>
                </div>
                <div class="form-group">
                    <label class="control-label"> <span class='red'></span></label>
                    <input type="submit" name="save" class="btn btn-primary">
                </div>

            </div>
        </div>
    </div>
    <?php form_close(); ?>

<?php endforeach ?>

<?php load_content_footer() ?>

<?php #place javascript for this page bellow ?>
<script>

</script>

<?php #this page is closed by this footter ?>
<?php load_footer() ?>